home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Development Environments ƒ / Perl 4.0.2 ƒ / Perl.r < prev    next >
Encoding:
Text File  |  1992-01-12  |  7.5 KB  |  315 lines

  1. /*
  2.  *    Copyright (c) 1991 Tim Endres & Matthias Neeracher
  3.  *
  4.  *    You may distribute under the terms of the GNU General Public License
  5.  *    as specified in the README file that comes with the perl 3.0 kit.
  6.  *
  7.  * Revision 4.0  04Dec91 TE
  8.  * 4.0 baseline.
  9.  * 
  10.  */
  11.  
  12. #include "SysTypes.r"        /* To get system types */
  13. #include "Types.r"            /* To get general types */
  14. #include "Cmdo.r"            /* For commando interface */
  15.  
  16. include "Perl.rsrc";
  17.  
  18. resource 'vers' (1) {
  19.     0x04, 0x02, final, 0x03, verUS,
  20.     "4.0.2",
  21.     "Perl - ported by Matthias Neeracher and Tim Endres."
  22.     };
  23.     
  24. resource 'vers' (2) {
  25.     0x04, 0x02, final, 0x03, verUS,
  26.     "4.0.2",
  27.     "Perl 4.0.2 (01Jan92)"
  28.     };
  29.  
  30. resource 'DLOG' (2001)    {
  31.     {  0,   0, 150, 400},
  32.     dBoxProc,
  33.     invisible,
  34.     noGoAway,
  35.     0,
  36.     2001,
  37.     ""
  38. };
  39.  
  40. resource 'DITL' (2001)    {
  41.     {
  42.         {119,  307, 137,  387}, Button         { enabled, "B1"},
  43.         {119, 8406, 137, 8486}, Button         { enabled, "B2"},
  44.         {119, 8313, 137, 8393}, Button         { enabled, "B3"},
  45.         { 13,   23,  45,   55}, Icon        {disabled, 0    },
  46.         { 13,   78, 103,  387}, StaticText    {disabled, "Prompt"}
  47.     }
  48. };
  49.  
  50. resource 'DLOG' (2002)    {
  51.     {  0,   0, 150, 400},
  52.     dBoxProc,
  53.     invisible,
  54.     noGoAway,
  55.     0,
  56.     2002,
  57.     ""
  58. };
  59.  
  60.  
  61. resource 'DITL' (2002)    {
  62.     {
  63.         {119,  307, 137,  387}, Button         { enabled, "B1"},
  64.         {119,  214, 137,  294}, Button         { enabled, "B2"},
  65.         {119, 8313, 137, 8393}, Button         { enabled, "B3"},
  66.         { 13,   23,  45,   55}, Icon        {disabled, 2    },
  67.         { 13,   78, 103,  387}, StaticText    {disabled, "Prompt"}
  68.     }
  69. };
  70.  
  71. resource 'DLOG' (2003)    {
  72.     {  0,   0, 150, 400},
  73.     dBoxProc,
  74.     invisible,
  75.     noGoAway,
  76.     0,
  77.     2003,
  78.     ""
  79. };
  80.  
  81. resource 'DITL' (2003)    {
  82.     {
  83.         {119, 307, 137, 387}, Button         { enabled, "B1"},
  84.         {119, 214, 137, 294}, Button         { enabled, "B2"},
  85.         {119, 121, 137, 201}, Button         { enabled, "B3"},
  86.         { 13,  23,  45,  55}, Icon            {disabled, 2    },
  87.         { 13,  78, 103, 387}, StaticText    {disabled, "Prompt"}
  88.     }
  89. };
  90.  
  91. resource 'DLOG' (2010) {
  92.     {0, 0, 104, 400},
  93.     dBoxProc,
  94.     invisible,
  95.     noGoAway,
  96.     0x0,
  97.     2010,
  98.     ""
  99. };
  100.  
  101. resource 'DITL' (2010, "Ask", purgeable) {
  102.     {    
  103.         {73, 307, 91, 387}, Button             { enabled, "OK"},
  104.         {73, 214, 91, 294},    Button             { enabled, "Cancel"},
  105.         {13,  13, 31, 387},    StaticText         {disabled, "^0"},
  106.         {44,  15, 60, 385}, EditText         {disabled, ""}
  107.     }
  108. };
  109.  
  110. resource 'DLOG' (2020) {
  111.     {38, 80, 245, 427},
  112.     dBoxProc,
  113.     invisible,
  114.     noGoAway,
  115.     0x0,
  116.     2020,
  117.     ""
  118. };
  119.     
  120. resource 'DITL' (2020) {
  121.     {    
  122.         {178,  30, 198,  88},    Button         { enabled, "OK"},
  123.         {178, 258, 198, 316},    Button         { enabled, "Cancel"},
  124.         {  2,   2,  19, 373},    StaticText     {disabled, "Prompt"},
  125.         { 19,   2, 168, 345},    UserItem     {disabled}
  126.     }
  127. };
  128.  
  129. resource 'DLOG' (2030, "Get Directory") {
  130.     {0, 0, 217, 348}, 
  131.     dBoxProc, 
  132.     invisible, 
  133.     noGoAway, 
  134.     0x0, 
  135.     2030, 
  136.     ""
  137. };
  138.  
  139. resource 'DITL' (2030, "Get Directory") {
  140.     {
  141.         { 142, 256,  160, 336},    Button        {enabled,"Open"},
  142.         {1152,  59, 1232,  77},    Button        {enabled,"Hidden"},
  143.         { 193, 256,  211, 336},    Button        {enabled,"Cancel"},
  144.         {  43, 232,   63, 347},    UserItem    {disabled},
  145.         {  72, 256,   90, 336},    Button        {enabled,"Eject"},
  146.         {  97, 256,  115, 336},    Button        {enabled,"Drive"},
  147.         {  43,  12,  189, 230},    UserItem    {enabled},
  148.         {  43, 229,  189, 246},    UserItem    {enabled},
  149.         { 128, 252,  129, 340},    UserItem    {disabled},
  150.         {1044,  20, 1145, 116},    StaticText    {disabled,""},
  151.         { 167, 256,  185, 336},    Button        {enabled,"Directory"},
  152.         {   0,  30,   18, 215},    Button        {enabled,"Select Current Directory:"},
  153.         { 200,  20, 1145, 136},    StaticText    {disabled,"Select a Folder"}
  154.     }
  155. };
  156.  
  157.  
  158. resource 'cmdo' (128) {
  159.     {
  160.         295,            /* Height of dialog */
  161.         "Perl -- Practical Extraction and Report Language\n"
  162.         "by Larry Wall <lwall@netlabs.com>",
  163.         {
  164.             Or {{-2}}, Files {
  165.                 InputFile,
  166.                 OptionalFile {
  167.                     { 17,  10,  33, 115},
  168.                     { 15, 117,  35, 195},
  169.                     "Program File:",
  170.                     "", "", "",
  171.                     "Select program file. If no files are specified and no program "
  172.                     "is given on the command line, standard input will be used.",
  173.                     dim,
  174.                     "Read Standard Input",
  175.                     "Select a script to execute╔",
  176.                     "",
  177.                 },
  178.                 Additional {
  179.                     "",
  180.                     ".pl",
  181.                     "Files ending with .pl",
  182.                     "All text files",
  183.                     {text}
  184.                 }
  185.             },
  186.             Or {{-1}}, RegularEntry {
  187.                 "Program:",
  188.                 { 42,  10,  58, 115},
  189.                 { 42, 120,  58, 465},
  190.                 "",
  191.                 keepCase,
  192.                 "-e",
  193.                 "Program to execute."
  194.             },
  195.             notDependent {}, MultiFiles {
  196.                 "Input File(s)╔",
  197.                 "Select input files.  If no files are specified, Perl reads from standard input.",
  198.                 { 15, 300, 35, 465},
  199.                 "Input files:",
  200.                 "",
  201.                 MultiInputFiles {
  202.                     {TEXT},
  203.                     FilterTypes,
  204.                     "Only text files",
  205.                     "All files",
  206.                 }
  207.             },
  208.             notDependent {}, Redirection {
  209.                 StandardInput,
  210.                 { 75,  20}
  211.             },
  212.             notDependent {}, Redirection {
  213.                 StandardOutput,
  214.                 {110,  20}
  215.             },
  216.             notDependent {}, Redirection {
  217.                 DiagnosticOutput,
  218.                 {145,  20}
  219.             },
  220.             notDependent {}, TextBox {
  221.                 gray,
  222.                 { 70,  10, 185, 240},
  223.                 "Redirection"
  224.             },
  225.             notDependent {}, CheckOption     {
  226.                 NotSet, { 75, 270,  91, 465}, "Print Version", "-v", 
  227.                 "Print version information to standard output.",
  228.             },
  229.             notDependent {}, CheckOption     {
  230.                 NotSet, { 92, 270, 108, 465}, "Syntax Check Only", "-c", 
  231.                 "Exit after syntax checking.",
  232.             },
  233.             notDependent {}, CheckOption     {
  234.                 NotSet, {109, 270, 125, 465}, "Print warnings", "-w", 
  235.                 "Print warnings about lots of likely errors.",
  236.             },
  237.             notDependent {}, CheckOption     {
  238.                 NotSet, {126, 270, 142, 465}, "Debug", "-d", 
  239.                 "Run Perl debugger at start.",
  240.             },
  241.             notDependent {}, CheckOption     {
  242.                 NotSet, {143, 270, 159, 465}, "Inplace processing", "-i.bak", 
  243.                 "Make backup and replace file.",
  244.             },
  245.             notDependent {}, NestedDialog    {
  246.                 2,
  247.                 {165, 270, 185, 440},
  248.                 "More Options╔",
  249.                 "Lots of switches to configure the behaviour of Perl."
  250.             },
  251.             notDependent {}, VersionDialog {
  252.                 VersionString {
  253.                     "4.0.2"
  254.                 },
  255.                 "Perl by Larry Wall <lwall@netlabs.com>\n"
  256.                 "MPW port by Matthias Neeracher <neeri@iis.ethz.ch>\n"
  257.                 "and Tim Endres <time@ice.com>\n",
  258.                 0
  259.             },
  260.         },
  261.         270,
  262.         "",
  263.         {
  264.             notDependent {}, RadioButtons {
  265.                 {
  266.                     { 36,  20,  51, 220}, "Newline", "", set, 
  267.                     "Records are terminated with newlines.",
  268.                     { 53,  20,  68, 220}, "Null Character", "-0", notset, 
  269.                     "Records are terminated with null characters",
  270.                     { 70,  20,  85, 220}, "Paragraph", "-00", notset, 
  271.                     "Records are terminated with two consecutive newlines"
  272.                 }
  273.             },
  274.             Or {{-3}}, CheckOption {
  275.                 NotSet, { 36, 240,  52, 465}, "Automatic Loop", "-n", 
  276.                 "Iterate script once for each input line."
  277.             },
  278.             Or {{-2}}, CheckOption {
  279.                 NotSet, { 53, 240,  69, 465}, "Automatic Printing Loop", "-p", 
  280.                 "Iterate script once for each input line, printing the line by default."
  281.             },
  282.             notDependent {}, CheckOption {
  283.                 NotSet, { 70, 240,  86, 465}, "Autosplit mode", "-a", 
  284.                 "Split input line before processing."
  285.             },
  286.             notDependent {}, CheckOption {
  287.                 NotSet, { 87, 240, 103, 465}, "Automatic Line End Processing", "-l", 
  288.                 "Chop input line and append newline on printing."
  289.             },
  290.             notDependent {}, CheckOption {
  291.                 NotSet, {115,  20, 131, 220}, "Run through C Preprocessor", "-P", 
  292.                 "Run the script through the C preprocessor first."
  293.             },
  294.             notDependent {}, CheckOption {
  295.                 NotSet, {132,  20, 148, 220}, "Switch parsing", "-s", 
  296.                 "Enables some rudimentary switch parsing."
  297.             },
  298.             notDependent {}, CheckOption {
  299.                 NotSet, {115, 240, 131, 465}, "Skip leading garbage.", "-x", 
  300.                 "Skip lines to the first #!perl line. Great for shell scripts."
  301.             },
  302.             notDependent {}, TextBox {
  303.                 gray,
  304.                 { 25,  10, 108, 225},
  305.                 "Record Separator"
  306.             },
  307.             notDependent {}, TextBox {
  308.                 gray,
  309.                 { 25, 235, 108, 470},
  310.                 "Useful for One Liners"
  311.             },
  312.         }
  313.     },
  314. };
  315.